list-[id].vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. <template>
  2. <div id="newsList">
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 导航栏 -->
  6. <HomePageNavigation1></HomePageNavigation1>
  7. <!-- 列表页广告一 -->
  8. <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
  9. <!-- 面包屑导航 -->
  10. <div class="breadcrumb">
  11. <div class="inner">
  12. <span class="location">当前位置:</span>
  13. <el-breadcrumb :separator-icon="ArrowRight">
  14. <el-breadcrumb-item>
  15. <NuxtLink to="/">首页</NuxtLink>
  16. </el-breadcrumb-item>
  17. <el-breadcrumb-item>本网招聘</el-breadcrumb-item>
  18. </el-breadcrumb>
  19. </div>
  20. </div>
  21. <!-- 资讯列表 -->
  22. <div class="newsList">
  23. <div class="inner">
  24. <div class="innerLeft">
  25. <div class="projectMoreBox">
  26. <div class="projectMoreTitle">社会保障在线网</div>
  27. <div class="projectMoreText">
  28. <p><b>政讯通·全国文化旅游项目</b>网络平台由<b>政讯通-全国政务信息一体化办公室</b>主管,联合30多家企事业单位组成,由北京政讯通文化传播有限公司对外牵头运营。</p>
  29. <p><b>政讯通·全国文化旅游项目</b>网络平台有政务、行业独立域名网站各<b>100</b>个和<b>4</b>个综合管理网站共<b>204</b>个网站,按照不同的行业和功能分类为用户提供大体系、广领域、全方位、全过程,有针对性的全国性文化旅游法制综合服务平台。</p>
  30. <p><b>政讯通·全国旅游资讯发布中心</b>是<b>政讯通·全国文化旅游项目</b>网络平台的4个综合管理网站之一,目前开设了栏目上千个,地市中心可全面覆盖我国334个地级市,<b>业务范围</b>涵盖旅游资讯、與情监测、法律咨询、旅游调研、法律宣传、群众监督、旅游安全等领域,日均会员访问量超过万次,累计完成文化旅游领域法制调研课题千余件,网络信息化会员遍布全国各地,实施<b>行业、区域</b>全覆盖,是我国具有广泛传播力、影响力的新型主流媒体。</p>
  31. </div>
  32. </div>
  33. <div class="innerTitle">本网招聘</div>
  34. <ul class="list">
  35. <li v-for="(item, index) in newsList" :key="index">
  36. <NuxtLink :to="{ path: `zhaopin/${item.id}.html` }" :title="item.con_title">{{item.con_title}}</NuxtLink>
  37. </li>
  38. </ul>
  39. </div>
  40. <div class="innerRight">
  41. <div class="rightMenuTitle">导航列表</div>
  42. <ul>
  43. <li v-for="(item, index) in bottomMenu" :key="index">
  44. <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
  45. v-if="item.id == pageId && item.id != 7" class="active">
  46. {{ item.name }}
  47. </NuxtLink>
  48. <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
  49. v-else-if="item.id != pageId && item.id != 7">
  50. {{ item.name }}
  51. </NuxtLink>
  52. <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
  53. v-if="item.id == 7 && pageId == 7" class="active">
  54. {{item.name }}
  55. </NuxtLink>
  56. <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name" v-else-if="item.id == 7">
  57. {{ item.name}}
  58. </NuxtLink>
  59. </li>
  60. </ul>
  61. </div>
  62. <div style="clear: both;"></div>
  63. </div>
  64. </div>
  65. <!-- 列表页广告二 -->
  66. <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
  67. <!-- 页面底部 -->
  68. <HomeFoot1></HomeFoot1>
  69. </div>
  70. </template>
  71. <script setup>
  72. //1.页面依赖 start ---------------------------------------->
  73. import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
  74. import { ArrowRight } from '@element-plus/icons-vue'
  75. import { ref, onMounted } from 'vue';
  76. //获得跳转过来的id
  77. const route = useRoute();
  78. //获得当前的完整路径
  79. const fullPath = route.path;
  80. //拆分,取出来中间这一段,然后提取数字部分
  81. const segments = fullPath.split('/');
  82. const targetSegment = segments[2];
  83. //const numberPart = targetSegment.match(/\d+$/)?.[0];
  84. let articleId;
  85. let pageId;
  86. //通过导航路径反向查询导航id
  87. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  88. method: 'GET',
  89. query: {
  90. 'foot_pinyin': targetSegment,
  91. },
  92. });
  93. if(getRouteId.code == 200){
  94. articleId = getRouteId.data.id;
  95. pageId = getRouteId.data.id;
  96. }else{
  97. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  98. console.log("错误位置:通过url路径查询导航池id")
  99. console.log("后端错误反馈:",getRouteId.message)
  100. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  101. }
  102. //1.页面依赖 end ---------------------------------------->
  103. //2.页面数据 start ---------------------------------------->
  104. //广告
  105. let adImg1 = ref([]);
  106. let adImg2 = ref([]);
  107. // async function getAdData(){
  108. // const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'PAGE'}});
  109. // if(adData.code==200){
  110. // for(let item of adData.data){
  111. // if(item.ad_tag == 'PAGE_0001'){
  112. // adImg1.value = item;
  113. // }
  114. // if(item.ad_tag == 'PAGE_0002'){
  115. // adImg2.value = item;
  116. // }
  117. // }
  118. // }else{
  119. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  120. // console.log("错误位置:获取详情页广告列表")
  121. // console.log("后端错误反馈:",adData.message)
  122. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  123. // }
  124. // }
  125. // getAdData();
  126. onMounted(async () => {
  127. //从客户端获取行政职能部门 加快打开速度
  128. const { $webUrl, $CwebUrl } = useNuxtApp();
  129. //广告1
  130. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_page_0001`
  131. const responseAd1 = await fetch(url, {
  132. headers: {
  133. 'Content-Type': 'application/json',
  134. 'Userurl': $CwebUrl,
  135. 'Origin': $CwebUrl
  136. }
  137. });
  138. const resultAd1 = await responseAd1.json();
  139. adImg1.value = resultAd1.data[0];
  140. //广告2
  141. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_page_0002`
  142. const responseAd2 = await fetch(url2, {
  143. headers: {
  144. 'Content-Type': 'application/json',
  145. 'Userurl': $CwebUrl,
  146. 'Origin': $CwebUrl
  147. }
  148. });
  149. const resultAd2 = await responseAd2.json();
  150. adImg2.value = resultAd2.data[0];
  151. })
  152. //左侧导航
  153. const bottomMenu = ref([]);
  154. async function getPageMenu() {
  155. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  156. method: 'GET',
  157. query: {},
  158. });
  159. bottomMenu.value = mkdata.data;
  160. }
  161. getPageMenu();
  162. //列表
  163. const newsList = ref([]);
  164. let newslists = async () => {
  165. const listData = await requestDataPromise('/web/getWebsiteFooterCategoryList', {
  166. method: 'GET',
  167. query: {
  168. 'fcat_id':pageId,
  169. },
  170. });
  171. newsList.value = listData.data;
  172. }
  173. //获得列表
  174. newslists();
  175. //2.页面数据 end ---------------------------------------->
  176. //3 设置seo信息
  177. const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
  178. method: 'GET',
  179. query: {},
  180. });
  181. let seoTitle = setData.data.website_head.title;
  182. let seoDescription = setData.data.website_head.description;
  183. let seoKeywords = setData.data.website_head.keywords;
  184. let seoSuffix = setData.data.website_head.suffix;
  185. let seoName = setData.data.website_head.website_name;
  186. useSeoMeta({
  187. title: seoTitle + "_" + seoSuffix,
  188. meta: [
  189. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  190. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
  191. ]
  192. });
  193. //3.设置seo信息 end---------------------------------------->
  194. </script>
  195. <style lang="less" scoped>
  196. //导航条
  197. .breadcrumb {
  198. width: 100%;
  199. height: 22px;
  200. margin-bottom: 30px;
  201. font-family: Microsoft YaHei, Microsoft YaHei;
  202. font-weight: 400;
  203. font-size: 20px;
  204. color: #666666;
  205. line-height: 23px;
  206. text-align: left;
  207. font-style: normal;
  208. text-transform: none;
  209. :deep(.el-breadcrumb) {
  210. display: inline-block;
  211. vertical-align: -4px;
  212. }
  213. :deep(.el-breadcrumb__inner a),
  214. :deep(.el-breadcrumb__inner.is-link) {
  215. color: #666666;
  216. font-weight: 400;
  217. text-decoration: none;
  218. transition: var(--el-transition-color);
  219. }
  220. span {
  221. font-family: Microsoft YaHei, Microsoft YaHei;
  222. font-weight: 400;
  223. font-size: 20px;
  224. color: #666666;
  225. line-height: 23px;
  226. text-align: left;
  227. font-style: normal;
  228. text-transform: none;
  229. }
  230. span:hover {
  231. color: #666666;
  232. }
  233. .location {
  234. margin-right: 20px;
  235. width: 100px;
  236. height: 22px;
  237. font-family: Microsoft YaHei, Microsoft YaHei;
  238. font-weight: 400;
  239. font-size: 20px;
  240. color: #666666;
  241. line-height: 23px;
  242. text-align: left;
  243. font-style: normal;
  244. text-transform: none;
  245. }
  246. }
  247. // 资讯列表
  248. .newsList {
  249. width: 100%;
  250. margin-bottom: 70px;
  251. .inner {
  252. width: 1200px;
  253. height: 1300px;
  254. .innerLeft {
  255. height: 65px;
  256. line-height: 65px;
  257. font-size: 22px;
  258. color: #028E21;
  259. font-weight: bold;
  260. }
  261. .innerTitle {
  262. font-size: 24px;
  263. }
  264. .innerLeft {
  265. float: right;
  266. >.list {
  267. height: 570px;
  268. margin-bottom: 70px;
  269. border-top: 1px solid #139602;
  270. >li {
  271. width: 790px;
  272. height: 60px;
  273. white-space: nowrap;
  274. overflow: hidden;
  275. text-overflow: ellipsis;
  276. line-height: 60px;
  277. //border-bottom: 1px solid #D9D9D9;
  278. >a {
  279. width: 360px;
  280. height: 26px;
  281. cursor: pointer;
  282. font-family: Microsoft YaHei, Microsoft YaHei;
  283. font-weight: 400;
  284. font-size: 20px;
  285. color: #333333;
  286. line-height: 26px;
  287. text-align: left;
  288. font-style: normal;
  289. text-transform: none;
  290. }
  291. }
  292. >li:hover>a {
  293. color: #139602;
  294. }
  295. >li:nth-child(1)::after,
  296. >li:nth-child(2)::after {
  297. content: "热";
  298. margin-left: 13px;
  299. background: #FF8A37;
  300. color: #fff;
  301. font-size: 14px;
  302. padding: 0px 2px;
  303. }
  304. >li:nth-child(5n) {
  305. border-bottom: 1px solid #D9D9D9;
  306. }
  307. }
  308. >.pagination {
  309. width: 800px;
  310. height: 34px;
  311. margin-left: 141px;
  312. display: flex;
  313. justify-content: center;
  314. margin: 0;
  315. // 鼠标移入后字体颜色
  316. .el-pagination::v-deep :hover {
  317. color: #139609;
  318. }
  319. .el-pagination.is-background::v-deep .btn-next,
  320. .el-pagination.is-background::v-deep .btn-prev {
  321. width: 70px;
  322. height: 34px;
  323. margin: 0px 10px;
  324. border-radius: 4px;
  325. }
  326. .el-pagination.is-background::v-deep .el-pager li {
  327. margin: 0px 10px;
  328. width: 38px;
  329. height: 34px;
  330. border-radius: 4px;
  331. }
  332. .el-pagination.is-background::v-deep .btn-next.is-active,
  333. .el-pagination.is-background::v-deep .btn-prev.is-active,
  334. .el-pagination.is-background::v-deep .el-pager li.is-active {
  335. background-color: #028e21;
  336. color: #fff;
  337. }
  338. }
  339. }
  340. .innerRight {
  341. width: 279px;
  342. .rightMenuTitle {
  343. width: 279px;
  344. height: 69px;
  345. font-size: 22px;
  346. font-weight: bold;
  347. line-height: 58px;
  348. text-align: center;
  349. color: #fff;
  350. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreTitle.png") no-repeat;
  351. margin-bottom: 30px;
  352. }
  353. ul {
  354. li {
  355. a {
  356. border-left: 5px solid #028E21;
  357. margin-bottom: 15px;
  358. font-size: 22px;
  359. display: block;
  360. height: 61px;
  361. line-height: 61px;
  362. color: #333333;
  363. text-align: center;
  364. background: #FBFBFB;
  365. }
  366. }
  367. }
  368. .active {
  369. border-left: 0;
  370. border: 1px solid #028E21;
  371. background: #fff;
  372. }
  373. }
  374. }
  375. }
  376. //资讯推荐
  377. .zixuntuijian {
  378. width: 100%;
  379. height: 290px;
  380. margin-bottom: 70px;
  381. .innerLeft {
  382. // 左侧
  383. .zixunLeft {
  384. margin-right: 30px;
  385. }
  386. .zixunRight,
  387. .zixunLeft {
  388. float: left;
  389. width: 380px;
  390. height: 290px;
  391. // 标题部分
  392. >.title {
  393. width: 380px;
  394. }
  395. >.title>h3 {
  396. height: 36px;
  397. font-family: Source Han Sans, Source Han Sans;
  398. font-weight: bold;
  399. font-size: 24px;
  400. color: #000000;
  401. line-height: 28px;
  402. text-align: left;
  403. font-style: normal;
  404. text-transform: none;
  405. border-bottom: 1px solid #139602;
  406. }
  407. >.title>h3>span {
  408. float: right;
  409. width: 56px;
  410. height: 20px;
  411. line-height: 24px;
  412. font-weight: 400;
  413. font-size: 14px;
  414. color: #999999;
  415. font-style: normal;
  416. text-transform: none;
  417. }
  418. .photo_text {
  419. >li:first-child {
  420. width: 380px;
  421. height: 120px;
  422. margin-top: 20px;
  423. margin-bottom: 15px;
  424. position: relative;
  425. >img {
  426. float: left;
  427. width: 160px;
  428. height: 120px;
  429. }
  430. >div {
  431. float: left;
  432. width: 220px;
  433. height: 120px;
  434. padding-left: 15px;
  435. padding-top: 6px;
  436. box-sizing: border-box;
  437. background-color: #f6f6f6;
  438. >h5 {
  439. width: 200px;
  440. height: 54px;
  441. display: -webkit-box;
  442. -webkit-box-orient: vertical;
  443. -webkit-line-clamp: 2;
  444. overflow: hidden;
  445. text-overflow: ellipsis;
  446. word-break: break-all;
  447. font-family: Source Han Sans, Source Han Sans;
  448. font-weight: 500;
  449. font-size: 18px;
  450. color: #333333;
  451. line-height: 26px;
  452. text-align: left;
  453. font-style: normal;
  454. text-transform: none;
  455. }
  456. >p {
  457. width: 200px;
  458. height: 22px;
  459. line-height: 20px;
  460. position: absolute;
  461. bottom: 5px;
  462. right: 0;
  463. >span {
  464. display: inline-block;
  465. // width: 100px;
  466. height: 18px;
  467. font-family: Source Han Sans, Source Han Sans;
  468. font-weight: 400;
  469. font-size: 12px;
  470. color: #999999;
  471. text-align: left;
  472. line-height: 14px;
  473. font-style: normal;
  474. text-transform: none;
  475. }
  476. >span:last-child {
  477. // width: 90px;
  478. text-align: right;
  479. margin-left: 20px;
  480. }
  481. }
  482. }
  483. }
  484. >li {
  485. width: 380px;
  486. height: 25px;
  487. white-space: nowrap;
  488. overflow: hidden;
  489. text-overflow: ellipsis;
  490. font-family: PingFang SC, PingFang SC;
  491. font-weight: 500;
  492. font-size: 18px;
  493. color: #333333;
  494. line-height: 21px;
  495. text-align: left;
  496. font-style: normal;
  497. text-transform: none;
  498. margin-bottom: 10px;
  499. em {
  500. display: inline-block;
  501. width: 8px;
  502. height: 8px;
  503. border-radius: 8px;
  504. margin-right: 10px;
  505. background-color: #d9d9d9;
  506. }
  507. }
  508. >li:hover {
  509. color: #139602;
  510. }
  511. >li:hover em {
  512. background-color: #139602;
  513. }
  514. }
  515. }
  516. }
  517. .innerRight {
  518. width: 381px;
  519. height: 290px;
  520. background-color: #fbfbfb;
  521. >.title {
  522. width: 380px;
  523. height: 40px;
  524. line-height: 40px;
  525. border-top: 1px solid #139602;
  526. border-bottom: 1px solid #e7e7e7;
  527. >h4 {
  528. font-family: Microsoft YaHei, Microsoft YaHei;
  529. font-weight: 400;
  530. margin-left: 20px;
  531. font-size: 20px;
  532. color: #000000;
  533. text-align: left;
  534. font-style: normal;
  535. text-transform: none;
  536. >span {
  537. float: right;
  538. font-family: Microsoft YaHei, Microsoft YaHei;
  539. font-weight: 400;
  540. font-size: 14px;
  541. margin-right: 10px;
  542. color: #999999;
  543. text-align: left;
  544. font-style: normal;
  545. text-transform: none;
  546. }
  547. }
  548. }
  549. .rightList {
  550. height: 540px;
  551. margin-top: 20px;
  552. >li {
  553. height: 100px;
  554. margin-bottom: 10px;
  555. >img {
  556. width: 150px;
  557. height: 100px;
  558. }
  559. >p {
  560. width: 219px;
  561. height: 100px;
  562. padding-left: 12px;
  563. font-family: PingFang SC, PingFang SC;
  564. font-weight: 400;
  565. font-size: 16px;
  566. color: #333333;
  567. line-height: 22px;
  568. text-align: left;
  569. font-style: normal;
  570. text-transform: none;
  571. }
  572. >p:hover {
  573. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  574. }
  575. }
  576. }
  577. }
  578. }
  579. .projectMoreBox {
  580. margin: 0 auto;
  581. height: 540px;
  582. margin-top: 20px;
  583. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreBg.png") no-repeat;
  584. margin-bottom: 40px;
  585. .projectMoreTitle {
  586. color: #028E21;
  587. padding-top: 20px;
  588. font-size: 26px;
  589. padding-left: 204px;
  590. }
  591. .projectMoreText {
  592. padding: 40px;
  593. font-size: 20px;
  594. color: #333333;
  595. text-indent: 2em;
  596. line-height: 36px;
  597. }
  598. }
  599. </style>